//
//  UIView+Extension.swift
//  todaySwift
//
//  Created by ChokWah on 2018/3/13.
//  Copyright © 2018年 ChokWah. All rights reserved.
//

import Foundation
import UIKit

protocol NibLoadable {}
extension NibLoadable {
    static func loadViewFromNib() -> Self {
        return Bundle.main.loadNibNamed("\(self)", owner: nil, options: nil)?.last as! Self
    }
}

protocol RegisterCellOrNib {}
extension RegisterCellOrNib {
    static var identifier : String {
        return "\(self)"
    }
    static var nib : UINib? {
        return UINib(nibName: "\(self)", bundle: nil)
    }
}
